package com.health.teahouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.health.teahouse.mapper.DietAdviceMapper;
import com.health.teahouse.domain.DietAdvice;
import com.health.teahouse.service.IDietAdviceService;

/**
 * 饮食建议信息Service业务层处理
 * 
 * @author yang
 * @date 2024-02-11
 */
@Service
public class DietAdviceServiceImpl implements IDietAdviceService 
{
    @Autowired
    private DietAdviceMapper dietAdviceMapper;

    /**
     * 查询饮食建议信息
     * 
     * @param adviceId 饮食建议信息主键
     * @return 饮食建议信息
     */
    @Override
    public DietAdvice selectDietAdviceByAdviceId(Long adviceId)
    {
        return dietAdviceMapper.selectDietAdviceByAdviceId(adviceId);
    }

    /**
     * 查询饮食建议信息列表
     * 
     * @param dietAdvice 饮食建议信息
     * @return 饮食建议信息
     */
    @Override
    public List<DietAdvice> selectDietAdviceList(DietAdvice dietAdvice)
    {
        return dietAdviceMapper.selectDietAdviceList(dietAdvice);
    }

    /**
     * 新增饮食建议信息
     * 
     * @param dietAdvice 饮食建议信息
     * @return 结果
     */
    @Override
    public int insertDietAdvice(DietAdvice dietAdvice)
    {
        return dietAdviceMapper.insertDietAdvice(dietAdvice);
    }

    /**
     * 修改饮食建议信息
     * 
     * @param dietAdvice 饮食建议信息
     * @return 结果
     */
    @Override
    public int updateDietAdvice(DietAdvice dietAdvice)
    {
        return dietAdviceMapper.updateDietAdvice(dietAdvice);
    }

    /**
     * 批量删除饮食建议信息
     * 
     * @param adviceIds 需要删除的饮食建议信息主键
     * @return 结果
     */
    @Override
    public int deleteDietAdviceByAdviceIds(Long[] adviceIds)
    {
        return dietAdviceMapper.deleteDietAdviceByAdviceIds(adviceIds);
    }

    /**
     * 删除饮食建议信息信息
     * 
     * @param adviceId 饮食建议信息主键
     * @return 结果
     */
    @Override
    public int deleteDietAdviceByAdviceId(Long adviceId)
    {
        return dietAdviceMapper.deleteDietAdviceByAdviceId(adviceId);
    }
}
